package com.edu.admin.service;

import java.util.List;

import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import com.edu.admin.common.BaseService;
import com.edu.admin.entity.SysUserSubject;
import com.edu.admin.mapper.UserSubjectMapper;
import com.edu.admin.vo.UserSubjectVo;


/**
 * 教师学科服务
 * 
 * @author Wangjiong
 * 
 */
@Transactional
@Service
public class UserSubjectService extends BaseService<UserSubjectMapper, SysUserSubject> {
	
	
	/**
	 * 获取教师学科列表
	 * 
	 * @param userId
	 * 
	 * @return List<UserSubjectVo>
	 */
	public List<UserSubjectVo> getUserSubjectList(Long userId) {
		return this.mapper.getUserSubjectList(userId);
	}
	
	
	
	
	/**
	 * 删除教师学科
	 * 
	 * @param userId
	 * 
	 * @return int
	 */
	public int deleteUserSubjectByUserId(Long userId) {
		
		if (userId != null) {
			return this.mapper.deleteUserSubjectByUserId(userId);

		}
		
		return 0;	

	}


}
